import { Injectable } from '@angular/core';
import {RequestUtil} from "../../../../util/request-util";
import {DamAPI} from "../../peach-constants";
import {Observable} from "rxjs/Observable";
import {MsgResult} from "../../../../models/msg-result";

@Injectable()
export class ExamineService {

  constructor(
    private requestUtil : RequestUtil
  ) { }
  /**
   *
   * @returns {Observable<MsgResult>|any}
   */
  getTargetGoal(year,month):Observable<MsgResult>{
    let params = "format=json&year="+year+"&month="+month;
    return this.requestUtil.get(DamAPI.getTargetGoal,params);
  }
  getTargetChart(year,month):Observable<MsgResult>{
    let params = "format=json&year="+year+"&month="+month;
    return this.requestUtil.get(DamAPI.getTargetChart,params);
  }
}
